define(['jquery','api','tmpl','text!pages/index/subscribe.html'],function($,api,tmpl,tpl){
	return {
		init:function(){
			var code=api.getQrcode(),
			    html=tmpl(tpl,{qrcode:code});
			  
			$('#page').html(html);
		},
		onRouteChange:function(){
		    $('#page').html('');
		}
   
	}
})